package com.example.demo.web.autoidempotent;

import lombok.Data;

import java.io.Serializable;

@Data
public class ResultVo implements Serializable {
    private String code;
    private String message;
    private String data;

    public ResultVo(){}

    public ResultVo(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static ResultVo getFailedResult(Integer code, String message) {
        return new ResultVo(code.toString(),message);
    }
    public static ResultVo getSuccessResult(String data){
        ResultVo vo = new ResultVo();
        vo.setData(data);
        return vo;
    }
}
